﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>adslider</title>
<meta name="content-type" content="text/html; charset=utf-8">
<script src="../../common/js/jquery-1.4.2.min.js"></script>
<script src="../../lib/all.js"></script>
<style>
	html,body{margin:0;padding:0;}
img{border-width:0;}
.panel_ad{margin-top:10px;width:740px;height:138px;border:solid 1px #CCC;font-size:12px;}
.adsliderbox{}
.adsliderbox a{display:block;position:absolute;z-index:-1;}
.adslidertabs{width:160px;height:138px;float:right;padding-left:5px;}
.adslidertab{height:46px;line-height:46px;background-color:#000;color:#FFF;text-align:center;opacity:0.5;filter:alpha(opacity=50);}
.adslidertab.selected{height:46px;line-height:46px;font-weight:700;color:#FFF;text-align:center;background-color:transparent;background-image:url(common/img/adslider_selected.png);background-position:0 center;margin-left:-5px;opacity:1;filter:alpha(opacity=100);}

</style>
</head>

<body>
	<h2>adSlider</h2>

	<div class="panel_ad"> 
		<div id="divAdSliderbox" class="adsliderbox">
			<div id="divAdSliderTabs" class="adslidertabs">
				<div class="adslidertab selected">"烤来烤趣"超值套餐</div>   
				<div class="adslidertab">乐弗涯亚洲餐厅</div>  
				<div class="adslidertab">哈玛匠超值双人</div>  
			</div>
			<div id="divAdSlidercontent">
				<div style="display:;"><a href="#"><img src="common/img/temp_ad01.gif" /> </a></div>
				<div style="display:none;"><a href="#"><img src="common/img/temp_ad02.jpg" /> </a></div>
				<div style="display:none;"><a href="#"><img src="common/img/temp_ad03.jpg" /> </a></div>
			</div>
		
		</div>
	</div>


	<script>
		  var tabbox=document.getElementById("divAdSliderTabs"),
		  tabcontent=document.getElementById("divAdSlidercontent");
		  tabbox.onmouseover=function(e){
				var e=e||window.event,
				tar=e.target||e.srcElement;
				if(tar.parentNode===tabbox){
					ad.goIndex(getIndex(tar));
				}
		  };
		  tabbox.onmouseout=function(e){
				ad.autoGo();
		  };
		  var ad=new AdSlider(tabbox,tabcontent);
		  ad.autoGo();
	</script>
</body>
</html>
